package com.pavco.caribbeanvisit.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.pavco.caribbeanvisit.shared.models.Country;
import com.pavco.caribbeanvisit.client.eventhandlers.CountryMarkerClickEventHandler;
import com.pavco.caribbeanvisit.client.ui.CountryMarker;

public class CountryMarkerClickEvent extends GwtEvent<CountryMarkerClickEventHandler> {
  public static final GwtEvent.Type<CountryMarkerClickEventHandler> TYPE =
    new GwtEvent.Type<CountryMarkerClickEventHandler>();
  
  private CountryMarker marker;
  private Country country;

  @Override
  protected void dispatch(CountryMarkerClickEventHandler handler) {
    handler.onMarkerClicked(this);
  }

  @Override
  public com.google.gwt.event.shared.GwtEvent.Type<CountryMarkerClickEventHandler> getAssociatedType() {
    return TYPE;
  }
  
  public void setMarker(CountryMarker marker) {
    this.marker = marker;
  }
  
  public CountryMarker getMarker() {
    return marker;
  }

  public Country getCountry() {
    return country;
  }

  public void setCountry(Country country) {
    this.country = country;
  }
}